package com.example.feignApi;

import com.example.handler.ProductCenterFeignApiWithSentinelFallback;
import com.example.handler.ProductCenterFeignApiWithSentinelFallbackFactory;
import com.example.mall.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @ClassName ProductFeignApiWithSentinel
 * @Description TODO
 * @Author: XMK
 * @Date: 2020/4/29 18:43
 * @Version: 1.0
 */
@FeignClient(name = "product-center", url = "http://localhost:82", fallback = ProductCenterFeignApiWithSentinelFallback.class)
//@FeignClient(name = "product-center", fallbackFactory = ProductCenterFeignApiWithSentinelFallbackFactory.class)
public interface ProductFeignApiWithSentinel {
    @GetMapping("/selectProductByOrderId/{orderId}")
    Product selectProductByOrderId(@PathVariable("orderId") String orderId);
}
